package com.baiyichen.service;

import com.baiyichen.dao.BooksMapper;
import com.baiyichen.pojo.Books;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Service;

import java.sql.PreparedStatement;
import java.util.List;

/**
 * Author:BaiYiChen
 * Date:2022/3/2212:56
 */
@Service
public class BooksServiceImpl implements BooksService{
  @Autowired
  private BooksMapper booksImpl;
  
  public void setBooksImpl(BooksMapper booksImpl) {
    this.booksImpl = booksImpl;
  }
  
  @Override
  public Books getById(int id) {
    return booksImpl.getById(id);
  }
  
  @Override
  public List<Books> getBooks() {
    return booksImpl.getBooks();
  }
  
}
